home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-07-02 | 583 b | 18 lines | [TEXT/ToyS] |
- on open x
- tell application "Scriptable Text Editor"
- open x
- set charCount to 0
- set wordCount to 0
- set paraCount to 0
- repeat with i from 1 to number of documents
- set charCount to charCount + (number of characters in document i)
- set wordCount to wordCount + (number of words in document i)
- set paraCount to paraCount + (number of paragraphs in document i)
- end repeat
- close documents saving no
- end tell
- display dialog "Total counts…" & return & ¬
- "Chars : " & charCount & return & ¬
- "Words : " & wordCount & return & ¬
- "Paragraphs : " & paraCount
- end open